<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>运单结款记录汇总存档资料</title>
    <style>
        body {
            font-family: Microsoft YaHei, serif;
            margin: 0;
            padding: 0;
            table-layout: fixed;
        }

        .page {
            margin: 0 auto;
            display: flex;
        }
        .showPaper {
            width: 29.7cm;
            padding: 0.445cm 0.5cm;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.15)
        }
        @page {
            size: A4 landscape;
            @bottom-left {
                content: "企业核心存档资料 仅用于开具发票 禁止拷贝或用于其他任何用途";
            }
        }

        @media print {
            .page {
                border: initial;
                border-radius: initial;
                width: initial;
                box-shadow: initial;
                background: initial;
                page-break-after: always;
            }
        }

        .subpage {
            width: 100%;
        }

        /*标题*/
        .body-title {
            text-align: center;
            color: #2C2C2C;
            width: 100%;
            font-weight: 800;
            padding-bottom: 16px;
            font-size: 18px;
        }

        /*表格头*/
        .body-sub {
            width: 100%;
            border-top: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
            height: 34px;
            font-size: 13px;
        }
        .body-sub div {
            text-align: center;
            float: left;
        }

        /*表格属性*/
        table,
        td,
        th {
            text-align: center;
            border-collapse: collapse;
        }

        /*横向表格内容*/
        .tds {
            height: 30px;
            font-size: 12px;
            border-left: 1px solid rgba(173, 189, 204, 0.51);
            border-right: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
        }

        /*表格表头标题*/
        .tdt {
            height: 30px;
            font-size: 12px;
            font-weight: 800;
            border-left: 1px solid rgba(173, 189, 204, 0.51);
            border-right: 1px solid rgba(173, 189, 204, 0.51);
            border-bottom: 1px solid rgba(173, 189, 204, 0.51);
        }
    </style>
</head>
<body>
<div class="book" id="book">
    <div class="page" th:classappend="${!pdfPrint?'showPaper':''}">
        <div class="subpage">
            <div class="body-title">贵州极舜货运有限公司：运单结款记录汇总存档资料</div>
            <table class="body-sub" style="width: 100%">
                <tr>
                    <td class="text-center" th:text="'收款人：'+${payeeName}">收款人：李欣</td>
                    <td class="text-center" th:text="'收款账号：'+${payeeAccount}">收款账号：6228485525214524728</td>
                    <td class="text-center" th:text="'订单条数：'+${orderCount}">订单条数：152单</td>
                    <td class="text-center" th:text="'付款总额：￥'+${orderPayeeCost}">付款总额：30020元</td>
                    <td class="text-center" th:text="'生成日期：'+${generateDate}">生成日期：2023/07/10</td>
                </tr>
            </table>
            <table th:if="orderSettlementCostList" style="width: 100%">
                <tr>
                    <td class="tdt"> 运单编号</td>
                    <td class="tdt"> 付款方</td>
                    <td class="tdt"> 付款账号</td>
                    <td class="tdt"> 付款金额</td>
                    <td class="tdt"> 支付单号</td>
                    <td class="tdt"> 支付通道</td>
                    <td class="tdt"> 备查流水号</td>
                    <td class="tdt"> 支付完成时间</td>
                </tr>
                <tr th:each="settlement:${orderSettlementCostList}">
                    <td class="tds" th:text="${settlement.transportNo}"></td>
                    <td class="tds" th:text="${settlement.platName}">贵州极舜货运有限公司</td>
                    <td class="tds" th:text="${settlement.paymentCapitalAccount}">6228481198021394170</td>
                    <td class="tds" th:text="${'￥'+#numbers.formatDecimal(settlement.settlementCost,0,2)}+'元'">￥25023.00元</td>
                    <td class="tds" th:text="${settlement.tradeNo}">TD1234567891023456</td>
                    <td class="tds" th:text="${settlement.paymentTypeName}">民生银行银企直连</td>
                    <td class="tds" th:text="${settlement.bankFlowNo}">1526347896363256652556</td>
                    <td class="tds" th:text="${#dates.format(settlement.payCompleteTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
</body>
</html>